pp108 : application Property

application Property


Object that denotes the application Definition for the lookup page.

Syntax

HTML

<IMG class="buslookup" application=oApplication.XMLDocument>

Scripting

imgID.application = oApplication.XMLDocument


Parameters

Parameter

Description

oApplication

Object that denotes the application definition that is used to open the lookup page. This is same as that of the application Definition that is given as input to the select method of theapplicationcomponent.


Remarks


The Application Definition that is a pointer to an XML document that contains information about the caption, description of the page, the url to be opened, frame in which the page needs to be opened etc., Following is a sample of how the application can be defined:

XML

<script id="applicationGetEmployees" type="cordys/xml">
    <Application>
        <id>appGetEmployees</id>
        <description>Get Employees</description>
        <caption>Get Employees</caption>
        <url>/cordys/wcp/mygeneratedfiles/employees/getemployees.htm</url>
        <frame features="width=500px,height=700px,center=yes,status=no, resizable=yes">lookupEmployees</frame>
        <data>true</data>
    </Application>
</script>



Though<id>and<frame>are specified in the above example, both of them will be internally set by the buslookup component.

In the above XML, the<features>property is a mandatory one which is a string separated by commas that describes the features of the new window to be opened such as width, height etc., This is the same as the "features" attribute of window object's open() method.

Apart from "<features>", a<data>property can also be set in the application definition. This can carry any data from the parent page to the lookup page. The following sample piece of code is written in "onselect" event of the application to receive this data value:

HTML

function selectApplication()
{
    var data = cordys.selectXMLNode(window.event.applicationDefinition,"".//*[local-name()='data']"");
    if (data &amp;&amp; cordys.getTextContent(data) == "true")
    {
        application.notify("The window is a lookup page !");
    }
}


See Also


buslookup, application